<% layout('/layouts/default.html', {title: '任务部署分发表管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
  <div class="box box-main">
    <div class="box-header with-border">
      <div class="box-title">
        <i class="fa icon-note"></i> ${text(dcSupTaskAction.isNewRecord ? '新增任务部署分发表' : '编辑任务部署分发表')}
      </div>
      <div class="box-tools pull-right">
        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
      </div>
    </div>
    <#form:form id="inputForm" model="${dcSupTaskAction}" action="${ctx}/action/dcSupTaskAction/save" method="post" class="form-horizontal">
    <div class="box-body">
      <div class="form-unit">${text('基本信息')}</div>
      <div class="row">
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required ">*</span> ${text('主键')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:hidden path="isNewRecord"/>
              <#form:input path="id" maxlength="64" readonly="${!dcSupTaskAction.isNewRecord}" class="form-control required"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('任务id')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="taskId" maxlength="64" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('牵头责任单位编号')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="leaderOrgCode" maxlength="100" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('牵头责任单位名称')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="leaderOrgName" maxlength="100" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('是否转发')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="transferFlag" maxlength="10" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('转发单位编号')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="transferOrgCode" maxlength="100" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('转发单位名称')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="transferOrgName" maxlength="100" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('是否批示')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="explainFlag" maxlength="10" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('领导批示')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="explainContent" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('任务状态')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="taskStatus" maxlength="10" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('任务完成进度')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="taskProgress" maxlength="10" class="form-control"/>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-12">
          <div class="form-group">
            <label class="control-label col-sm-2" title="">
              <span class="required hide">*</span> ${text('备注')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-10">
              <#form:textarea path="remarks" rows="4" maxlength="500" class="form-control"/>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('备用字段1')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="remarks1" class="form-control digits"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('备用字段2')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="remarks2" maxlength="200" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('备用字段3')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="remarks3" maxlength="200" class="form-control"/>
            </div>
          </div>
        </div>
        <div class="col-xs-6">
          <div class="form-group">
            <label class="control-label col-sm-4" title="">
              <span class="required hide">*</span> ${text('备用字段4')}：<i class="fa icon-question hide"></i></label>
            <div class="col-sm-8">
              <#form:input path="remarks4" maxlength="200" class="form-control"/>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-12">
          <div class="form-group">
            <label class="control-label col-sm-2">
              <span class="required hide">*</span> ${text('图片上传')}：</label>
            <div class="col-sm-10">
              <#form:fileupload id="uploadImage" bizKey="${dcSupTaskAction.id}" bizType="dcSupTaskAction_image"
              uploadType="image" class="" readonly="false" preview="true"/>
            </div>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="col-xs-12">
          <div class="form-group">
            <label class="control-label col-sm-2">
              <span class="required hide">*</span> ${text('附件上传')}：</label>
            <div class="col-sm-10">
              <#form:fileupload id="uploadFile" bizKey="${dcSupTaskAction.id}" bizType="dcSupTaskAction_file"
              uploadType="all" class="" readonly="false" preview="true"/>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="box-footer">
      <div class="row">
        <div class="col-sm-offset-2 col-sm-10">
          <% if (hasPermi('action:dcSupTaskAction:edit')){ %>
          <button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('提 交')}</button>&nbsp;
          <% } %>
          <button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
        </div>
      </div>
    </div>
  </#form:form>
</div>
</div>
<% } %>
<script>
  $("#inputForm").validate({
    submitHandler: function(form){
      js.ajaxSubmitForm($(form), function(data){
        js.showMessage(data.message);
        if(data.result == Global.TRUE){
          js.closeCurrentTabPage(function(contentWindow){
            contentWindow.page();
          });
        }
      }, "json");
    }
  });
</script>